package com.ruoyi.omp.api.enums;

import com.ruoyi.common.core.utils.StringUtils;

/**
 * @author: cjie
 * @description: 费用类型枚举
 * @date: 2021/9/23
 */
public enum  FeeTypeEnum {
    OFFICE("办公费用","1"),
    APARTMENT("公寓费用","2"),
    ELEVATOR("电梯费用","3"),
    FACILITY("设施费用","4"),
    FIXED("固定费用","5"),
    PARKING("停车费用","6"),
    PROPERTY("物业费用","7"),
    WATER("水费","8"),
    ELECTRICITY("电费","9"),
    WATERELANDEl("水电费","10");
    /**费用类型*/
    private String type;
    /**费用编码*/
    private String code;

    FeeTypeEnum(String type, String code) {
        this.type = type;
        this.code = code;
    }

    public String getType() {
        return type;
    }

    public String getCode() {
        return code;
    }

    public static FeeTypeEnum getFeeTypeEnumByCode(String code){
        for(FeeTypeEnum typeEnum : FeeTypeEnum.values()){
            if(StringUtils.equals(code, typeEnum.getCode())){
                return typeEnum;
            }
        }
        return null;
    }
}
